package com.jkl.entity.dept;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @author liuzhennan
 * @create 2020-11-05 19:50
 * 新的部门表，多了一个`老系统的部门组织机构`的字段
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "bs_dept")
public class Dept {
    /**
     * 主键ID
     *
     * @mbg.generated
     */
    @Id
    @ColumnType(jdbcType = JdbcType.INTEGER)
    private Integer rowId;

    /**
     * 部门编码
     *
     * @mbg.generated
     */
    private String deptCode;

    /**
     * 部门名称
     *
     * @mbg.generated
     */
    private String deptName;

    /**
     * 部门类型：1、标准部门2、市局维护部门
     *
     * @mbg.generated
     */
    private Integer deptType;

    /**
     * 显示顺序
     *
     * @mbg.generated
     */
    private Integer sequence;

    /**
     * 部门级别
     *
     * @mbg.generated
     */
    private Integer level;

    /**
     * 上级部门ID
     *
     * @mbg.generated
     */
    private Integer parentId;

    /**
     * 状态：1启用，0停用
     *
     * @mbg.generated
     */
    private Integer status;

    // 颜色
    private String color;

    private String projectNo;

    private String oldDeptName;

    @Transient
    private List<Dept> children;
}
